﻿namespace DFGK_WMS.IRepository
{
    public interface IBaseRepository<T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool Add(T obj);

        /// <summary>
        /// 删除：主键为int类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool Del(int id);

        /// <summary>
        /// 删除：主键为long类型
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool Dels(long id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool Upd(T obj);

        /// <summary>
        /// 显示—查询—分页
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetAll();
    }
}